Integrand size = 30, antiderivative size = 183 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {1}{8} a \left (8 a^4+8 a^2 b^2-9 b^4\right ) x+\frac {b \left (83 a^4-32 a^2 b^2-16 b^4\right ) \sin (c+d x)}{30 d}+\frac {a b^2 \left (106 a^2-71 b^2\right ) \cos (c+d x) \sin (c+d x)}{120 d}+\frac {b \left (23 a^2-16 b^2\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{60 d}+\frac {a b (a+b \cos (c+d x))^3 \sin (c+d x)}{20 d}-\frac {b (a+b \cos (c+d x))^4 \sin (c+d x)}{5 d} \]
[Out]
Time = 0.34 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3095, 2832, 2813} \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {b \left (23 a^2-16 b^2\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{60 d}+\frac {a b^2 \left (106 a^2-71 b^2\right ) \sin (c+d x) \cos (c+d x)}{120 d}+\frac {b \left (83 a^4-32 a^2 b^2-16 b^4\right ) \sin (c+d x)}{30 d}+\frac {1}{8} a x \left (8 a^4+8 a^2 b^2-9 b^4\right )-\frac {b \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}+\frac {a b \sin (c+d x) (a+b \cos (c+d x))^3}{20 d} \]
[In]
[Out]
Rule 2813
Rule 2832
Rule 3095
Rubi steps \begin{align*} \text {integral}& = -\int (-a+b \cos (c+d x)) (a+b \cos (c+d x))^4 \, dx \\ & = -\frac {b (a+b \cos (c+d x))^4 \sin (c+d x)}{5 d}-\frac {1}{5} \int (a+b \cos (c+d x))^3 \left (-5 a^2+4 b^2-a b \cos (c+d x)\right ) \, dx \\ & = \frac {a b (a+b \cos (c+d x))^3 \sin (c+d x)}{20 d}-\frac {b (a+b \cos (c+d x))^4 \sin (c+d x)}{5 d}-\frac {1}{20} \int (a+b \cos (c+d x))^2 \left (-a \left (20 a^2-13 b^2\right )-b \left (23 a^2-16 b^2\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {b \left (23 a^2-16 b^2\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{60 d}+\frac {a b (a+b \cos (c+d x))^3 \sin (c+d x)}{20 d}-\frac {b (a+b \cos (c+d x))^4 \sin (c+d x)}{5 d}-\frac {1}{60} \int (a+b \cos (c+d x)) \left (-60 a^4-7 a^2 b^2+32 b^4-a b \left (106 a^2-71 b^2\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {1}{8} a \left (8 a^4+8 a^2 b^2-9 b^4\right ) x+\frac {b \left (83 a^4-32 a^2 b^2-16 b^4\right ) \sin (c+d x)}{30 d}+\frac {a b^2 \left (106 a^2-71 b^2\right ) \cos (c+d x) \sin (c+d x)}{120 d}+\frac {b \left (23 a^2-16 b^2\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{60 d}+\frac {a b (a+b \cos (c+d x))^3 \sin (c+d x)}{20 d}-\frac {b (a+b \cos (c+d x))^4 \sin (c+d x)}{5 d} \\ \end{align*}
Time = 1.48 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.76 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=-\frac {-60 a \left (8 a^4+8 a^2 b^2-9 b^4\right ) (c+d x)+60 b \left (-24 a^4+12 a^2 b^2+5 b^4\right ) \sin (c+d x)-120 a b^2 \left (2 a^2-3 b^2\right ) \sin (2 (c+d x))+10 b^3 \left (8 a^2+5 b^2\right ) \sin (3 (c+d x))+45 a b^4 \sin (4 (c+d x))+6 b^5 \sin (5 (c+d x))}{480 d} \]
[In]
[Out]
Time = 5.01 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.73
method | result | size |
parallelrisch | \(\frac {\left (240 a^{3} b^{2}-360 a \,b^{4}\right ) \sin \left (2 d x +2 c \right )+\left (-80 a^{2} b^{3}-50 b^{5}\right ) \sin \left (3 d x +3 c \right )-45 a \,b^{4} \sin \left (4 d x +4 c \right )-6 b^{5} \sin \left (5 d x +5 c \right )+\left (1440 a^{4} b -720 a^{2} b^{3}-300 b^{5}\right ) \sin \left (d x +c \right )+480 \left (a^{4}+a^{2} b^{2}-\frac {9}{8} b^{4}\right ) d x a}{480 d}\) | \(133\) |
derivativedivides | \(\frac {2 a^{3} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{5} \left (d x +c \right )-\frac {2 a^{2} b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+3 a^{4} b \sin \left (d x +c \right )-3 a \,b^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {b^{5} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(151\) |
default | \(\frac {2 a^{3} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{5} \left (d x +c \right )-\frac {2 a^{2} b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+3 a^{4} b \sin \left (d x +c \right )-3 a \,b^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {b^{5} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(151\) |
parts | \(a^{5} x -\frac {b^{5} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}-\frac {3 a \,b^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {3 \sin \left (d x +c \right ) a^{4} b}{d}+\frac {2 a^{3} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}\) | \(158\) |
risch | \(a^{5} x +a^{3} b^{2} x -\frac {9 a \,b^{4} x}{8}+\frac {3 \sin \left (d x +c \right ) a^{4} b}{d}-\frac {3 \sin \left (d x +c \right ) a^{2} b^{3}}{2 d}-\frac {5 \sin \left (d x +c \right ) b^{5}}{8 d}-\frac {b^{5} \sin \left (5 d x +5 c \right )}{80 d}-\frac {3 a \,b^{4} \sin \left (4 d x +4 c \right )}{32 d}-\frac {\sin \left (3 d x +3 c \right ) a^{2} b^{3}}{6 d}-\frac {5 \sin \left (3 d x +3 c \right ) b^{5}}{48 d}+\frac {\sin \left (2 d x +2 c \right ) a^{3} b^{2}}{2 d}-\frac {3 \sin \left (2 d x +2 c \right ) a \,b^{4}}{4 d}\) | \(178\) |
norman | \(\frac {\left (a^{5}+a^{3} b^{2}-\frac {9}{8} a \,b^{4}\right ) x +\left (a^{5}+a^{3} b^{2}-\frac {9}{8} a \,b^{4}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (5 a^{5}+5 a^{3} b^{2}-\frac {45}{8} a \,b^{4}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (5 a^{5}+5 a^{3} b^{2}-\frac {45}{8} a \,b^{4}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (10 a^{5}+10 a^{3} b^{2}-\frac {45}{4} a \,b^{4}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (10 a^{5}+10 a^{3} b^{2}-\frac {45}{4} a \,b^{4}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 b \left (135 a^{4}-50 a^{2} b^{2}-29 b^{4}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {b \left (24 a^{4}-8 a^{3} b -16 a^{2} b^{2}+15 a \,b^{3}-8 b^{4}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {b \left (24 a^{4}+8 a^{3} b -16 a^{2} b^{2}-15 a \,b^{3}-8 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {b \left (144 a^{4}-24 a^{3} b -64 a^{2} b^{2}+9 a \,b^{3}-16 b^{4}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {b \left (144 a^{4}+24 a^{3} b -64 a^{2} b^{2}-9 a \,b^{3}-16 b^{4}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(425\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.72 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (8 \, a^{5} + 8 \, a^{3} b^{2} - 9 \, a b^{4}\right )} d x - {\left (24 \, b^{5} \cos \left (d x + c\right )^{4} + 90 \, a b^{4} \cos \left (d x + c\right )^{3} - 360 \, a^{4} b + 160 \, a^{2} b^{3} + 64 \, b^{5} + 16 \, {\left (5 \, a^{2} b^{3} + 2 \, b^{5}\right )} \cos \left (d x + c\right )^{2} - 15 \, {\left (8 \, a^{3} b^{2} - 9 \, a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 321, normalized size of antiderivative = 1.75 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\begin {cases} a^{5} x + \frac {3 a^{4} b \sin {\left (c + d x \right )}}{d} + a^{3} b^{2} x \sin ^{2}{\left (c + d x \right )} + a^{3} b^{2} x \cos ^{2}{\left (c + d x \right )} + \frac {a^{3} b^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {4 a^{2} b^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac {2 a^{2} b^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {9 a b^{4} x \sin ^{4}{\left (c + d x \right )}}{8} - \frac {9 a b^{4} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} - \frac {9 a b^{4} x \cos ^{4}{\left (c + d x \right )}}{8} - \frac {9 a b^{4} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {15 a b^{4} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {8 b^{5} \sin ^{5}{\left (c + d x \right )}}{15 d} - \frac {4 b^{5} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} - \frac {b^{5} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\left (c \right )}\right )^{3} \left (a^{2} - b^{2} \cos ^{2}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.80 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {480 \, {\left (d x + c\right )} a^{5} + 240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} b^{2} + 320 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2} b^{3} - 45 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a b^{4} - 32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} b^{5} + 1440 \, a^{4} b \sin \left (d x + c\right )}{480 \, d} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.80 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=-\frac {b^{5} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {3 \, a b^{4} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {1}{8} \, {\left (8 \, a^{5} + 8 \, a^{3} b^{2} - 9 \, a b^{4}\right )} x - \frac {{\left (8 \, a^{2} b^{3} + 5 \, b^{5}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (2 \, a^{3} b^{2} - 3 \, a b^{4}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (24 \, a^{4} b - 12 \, a^{2} b^{3} - 5 \, b^{5}\right )} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Time = 3.38 (sec) , antiderivative size = 406, normalized size of antiderivative = 2.22 \[ \int (a+b \cos (c+d x))^3 \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (8\,a^4+8\,a^2\,b^2-9\,b^4\right )}{4\,\left (2\,a^5+2\,a^3\,b^2-\frac {9\,a\,b^4}{4}\right )}\right )\,\left (8\,a^4+8\,a^2\,b^2-9\,b^4\right )}{4\,d}-\frac {\left (-6\,a^4\,b+2\,a^3\,b^2+4\,a^2\,b^3-\frac {15\,a\,b^4}{4}+2\,b^5\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (-24\,a^4\,b+4\,a^3\,b^2+\frac {32\,a^2\,b^3}{3}-\frac {3\,a\,b^4}{2}+\frac {8\,b^5}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (-36\,a^4\,b+\frac {40\,a^2\,b^3}{3}+\frac {116\,b^5}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-24\,a^4\,b-4\,a^3\,b^2+\frac {32\,a^2\,b^3}{3}+\frac {3\,a\,b^4}{2}+\frac {8\,b^5}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-6\,a^4\,b-2\,a^3\,b^2+4\,a^2\,b^3+\frac {15\,a\,b^4}{4}+2\,b^5\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {a\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )\,\left (8\,a^4+8\,a^2\,b^2-9\,b^4\right )}{4\,d} \]
[In]
[Out]